﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Core.Toolkit.BaseLibrary
{
    public static class DateTimeExtension
    {
        /// <summary>
        /// 判断是否是周末
        /// </summary>
        /// <param name="dateTime"></param>
        /// <returns></returns>
        public static bool IsWeekend(this DateTime dateTime)
        {
            var day = dateTime.DayOfWeek;
            return (day == DayOfWeek.Sunday || day == DayOfWeek.Saturday);
        }
    }
}
